package cn.liujianbo.example.pattern.decorator;

import java.math.BigDecimal;

/**
 * @author 刘建波
 * @date 2022-03-04 13:57
 */
public class BaconDecorator extends GarnishDecorator{

    public BaconDecorator(FastFood fastFood) {
        super(fastFood, "+培根", new BigDecimal(5));
    }

    @Override
    public BigDecimal cost() {
        return getPrice().add(getFastFood().cost());
    }

}
